<template>
  <div>
    <p @click="emitFn">son1</p>
  </div>
</template>

<script>
import eventBus from "@/utils/eventbus";
export default {
  data() {
    return {
      name: "我是刘佳宇"
    };
  },
  methods: {
    emitFn() {
      console.log(eventBus);
      eventBus.$emit("myevent", this.name);
    }
  }
};
</script>
<style scoped>
</style>